package com.hz.ruoyimotor.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hz.rouyigonggong.domain.LgVehicle;
import com.hz.ruoyimotor.domain.dto.LgDriverDto;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface LgVehicleMapper extends BaseMapper<LgVehicle> {
    @Select("select * from lg_vehicle where vehicle_id = #{vehicleId}")
    public LgVehicle selectById(Integer vehicleId);
    List<LgVehicle> getReallyList(@Param("vehicleType") Integer vehicleType,
                                      @Param("vehicleLength") Double vehicleLength,
                                      @Param("vehicleVolume") Double vehicleVolume,
                                  @Param("licenseType") Integer licenseType,
                                      @Param("licensePlate") String licensePlate,
                                      @Param("vehicleStatus") Integer vehicleStatus,
                                  @Param("beginTime") String beginTime,
                                  @Param("endTime") String endTime,
                                      @Param("firstNum") Integer firstNum,
                                      @Param("secondNum") Integer secondNum,
                                  @Param("createBy") String createBy);
    int getCount(@Param("vehicleType") Integer vehicleType,
                 @Param("vehicleLength") Double vehicleLength,
                 @Param("vehicleVolume") Double vehicleVolume,
                 @Param("licenseType") Integer licenseType,
                 @Param("licensePlate") String licensePlate,
                 @Param("beginTime") String beginTime,
                 @Param("endTime") String endTime,
                 @Param("vehicleStatus") Integer vehicleStatus,
                 @Param("createBy") String createBy);
    @Update("UPDATE lg_vehicle SET vehicle_type = #{vehicleType}, " +
            "vehicle_length = #{vehicleLength}, " +
            "vehicle_volume = #{vehicleVolume}, " +
            "license_Type = #{licenseType}, " +
            "license_plate = #{licensePlate}, " +
            "vehicle_status = #{vehicleStatus}, " +
            "update_by = #{updateBy} " +
            "WHERE vehicle_id = #{vehicleId}")
    int updateById(LgVehicle lgVehicle);
    int deleteBatchIds(String[] vehicleIds);
     int getCountVehicle();

}
